package com.kucai.yifaqapp.util;

/**
 * Created by Administrator on 2019/1/2.
 */

public class Liuhecaibose {
    //开出特码所属颜色       0红色 1蓝色  2绿色
    public static int toimg(String str) {
        int a = Integer.parseInt(str);
        /**
         *"红色号码包括：01，02，07，08，12，13，18，19，23，24，29，30，34，35，40，45，46"
         " 蓝色号码包括：03，04，09，10，14，15，20，25，26，31，36，37，41，42，47，48"
         " 绿色号码包括: 05，06，11，16，17，21，22，27，28，32，33，38，39，43，44，49"
         */
        if (a == 1 || a == 2 || a == 7 || a == 8 || a == 12 || a == 13 || a == 18 || a == 19 ||
                a == 23 || a == 24 || a == 29 || a == 30 || a == 34 || a == 35 || a == 40 || a == 45 || a == 46) {
            return 0;
        }
        if (a == 3 || a == 4 || a == 9 || a == 10 || a == 14 || a == 15 || a == 20 || a == 25 ||
                a == 26 || a == 31 || a == 36 || a == 37 || a == 41 || a == 42 || a == 47 || a == 48) {
            return 1;
        }
        if (a == 5 || a == 6 || a == 11 || a == 16 || a == 17 || a == 21 || a == 22 || a == 27 ||
                a == 28 || a == 32 || a == 33 || a == 38 || a == 39 || a == 43 || a == 44 || a == 49) {
            return 2;
        }


        return 0;
    }
}
